package com.comleader.operator.common.response;

import lombok.Getter;

@Getter
public enum ResultEnum {

    /* 常用请求*/
    SUCCESS(0, "请求成功"),
    FAILED(-1, "请求失败"), VALIDATE_FAILED(400, "参数校验失败"),

    NOT_FOUND(404, "请求不存在"), METHOD_NOT_ALLOWED(405, "请求方法不正确"),

    // 常用在系统异常中
    ERROR(500, "系统异常"),

    PASSWORD_NOT_TRUE(1001, "账号或密码不正确"),

    FILE_EMPTY(2001, "文件为空，请重新选择"),
    FILE_NOT_UTF8(2002, "请以UTF-8格式提供数据"),

    INVALID_BUSINESS_TYPE(2003, "无效的业务类型"),

    FILE_NOT_EXIST(2004, "文件不存在"),



    /* 其他错误  9001-9999 */
    RESULT_STRING_TYPE_ERROR(9001, "返回String类型错误");
    private int code;
    private String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}